package cn.tiancaifan.micro.controller.system;


import cn.tiancaifan.micro.entity.SystemResults;
import cn.tiancaifan.micro.service.HrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/system/hr")
public class HrController {

    @Autowired
    HrService hrService;

    @GetMapping("/")
    public SystemResults getAllHr(){
        return SystemResults.ok(null,hrService.getAllHr());
    }

    @DeleteMapping("/{id}")
    public SystemResults deleteHrByID(@PathVariable("id") Integer id){
        return hrService.deleteHrByID(id);
    }

}
